{
  "properties" : { },
  "id" : "160706cb3cf54aeb842814a4aeecad29",
  "script" : null,
  "groupId" : "2890625047b645d4b5bfc450fc670b7c",
  "name" : "获取-匹配的菜单字节点",
  "createTime" : 1714063373125,
  "updateTime" : 1710645984136,
  "lock" : null,
  "createBy" : "管理员",
  "updateBy" : "管理员",
  "path" : "getNodeMenu",
  "description" : null,
  "returnType" : null,
  "mappingPath" : null,
  "parameters" : [ {
    "name" : "baseMenus",
    "value" : null,
    "description" : null,
    "required" : false,
    "dataType" : "String",
    "type" : "java.util.Collection",
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  }, {
    "name" : "nodeMenu",
    "value" : null,
    "description" : null,
    "required" : false,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  } ]
}
================================
import '@/user/getNodeMenu' as getNodeMenu;

for (menu in baseMenus) {
    if(nodeMenu.menuId == menu.parentId){
        var tMenu = {};
        
        if(menu.type == 0){
            tMenu = {"id": menu.path, "icon": menu.icon, "title": menu.menuName,"menuId": menu.menuId, "children": []};
            getNodeMenu(baseMenus, tMenu);
        } else if(menu.type == 1){
            tMenu = { "id": menu.path, "icon": menu.icon, "title": menu.menuName };
        } else if(menu.type == 2){
            tMenu = { "id": menu.path, "icon": menu.icon, "title": menu.menuName, "type": "modal" };
        } else if(menu.type == 3){
            tMenu = { "id": menu.path, "icon": menu.icon, "title": menu.menuName, "type": "blank" };
        }

        nodeMenu["children"].add(tMenu);
    }
}
nodeMenu["menuId"] = null;
